package com.wxm.pattern.simplepactory;

import com.wxm.pattern.IAnimal;

public class AnimalFactory {

    public IAnimal getAnimal(Class<? extends IAnimal> clazz) throws Exception {
        return (IAnimal) clazz.newInstance();
    }
}
